(function(angular) {
	"use strict";
	angular.module("fs.waf").controller("cls.glposting.viewController", viewController);
	viewController.$inject = [ "$scope", "layoutConfig", "validatorConfig", "authService", "glpostingService" ];
	function viewController($scope, layoutConfig, validatorConfig, authService, glpostingService) {
		var ctrl = this, glpostingInfo = $scope.$stateParams.params;
		ctrl.validatorConfig = validatorConfig;
		
		ctrl.init = function() {
			authService.view(glpostingInfo).then(function(response) {
				ctrl.layoutConfig = layoutConfig;
				ctrl.glposting = response.data || glpostingInfo;
			}, angular.noop);
		};
	}
})(angular);